<%-- 
    Document   : addBook
    Created on : Feb 25, 2012, 2:26:35 AM
    Author     : Hiroroi
--%>
<%@page import="java.text.SimpleDateFormat"%>
<%@page import="java.text.DateFormat"%>
<%@page import="java.sql.PreparedStatement"%>
<%@page import="java.sql.Connection"%>
<%@page import="DBConnection.ConnectionFactory"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Add Books</title>
        <script type ="text/javascript" src="js/addBookValidation.js"></script>

        <link rel = "stylesheet" href= "css/format.css" type="text/css"/>
        <link rel = "stylesheet" href= "css/menu.css" type="text/css"/>
        <link rel ="stylesheet" href="css/main.css" type="text/css"/>


    </head>
    <body>
        <%--
        <%
        String remoteAdd = request.getRemoteAddr();
        String Address = (String)session.getAttribute("IPAdd");
        String username = (String)session.getAttribute("username");
        
        if((String)session.getAttribute("username")== null)
            response.sendRedirect("home.jsp");
        else if((String)session.getAttribute("userType")== "3")
            {
            response.sendRedirect("acctMgrHomePage.jsp");
            }
        else if((String)session.getAttribute("userType")== "1")
            {
            response.sendRedirect("adminIndex.jsp");
            }
        else if((String)session.getAttribute("userType")== "4")
            {
            response.sendRedirect("userHomePage.jsp");
            }
        else{
        
        out.print("Hello ");
        out.print(username);
        }
        %>--%>


        <%--header--%>
    <center><div id="titlebar">

        </div></center>
        <%--header--%>

    <%--menu--%>
    <div id="tabs24">   
        <ul>          
            <li><a href="addBook.jsp" >Add Books</a></li>
            <li><a href="addMag.jsp" >Add Magazines</a></li>
            <li><a href="addCd.jsp">Add CDs</a></li>
            <li><a href="addDvd.jsp">Add DVDs</a></li>
        </ul>   
    </div>
    <%--menu--%>

    <div class="wrapper">
        <%--centercontent--%>


        <div id="main">

            <label>Add Book</label>
            <br>
            
                <form class="formAddStuff" name ="addBook" method ="post" action="addBookAction.jsp">
                    Book Title: <input type ="text" name ="bookTitle"><br>
                    <span id="bookTitleError" class="errorMessage"></span><br>

                    Book Author: <input type ="text" name="bookAuthor"><br>
                    <span id="bookAuthorError" class="errorMessage"></span><br>

                    Year Published: <input type="text" name ="bookYear"><br>
                    <span id="bookYearError" class="errorMessage"></span><br>
                    
                    Synopsis: <br><textarea rows="5" columns="50" name="synopsis" wrap="true"></textarea><br>
                    <span id="synopsisError" class="errorMessage"></span><br>
                    
                    Price: <input type="text" name="price"><br>
                    <span id="priceError" class="errorMessage"></span><br>

                    <!--Address: <input type="textarea" name ="address"><br>-->

                    <input type="submit" name="submit" value ="Add" onClick="return addBookValidator(this.form);"/>
                </form>
            
        </div>
    </div>
    <%--centercontent--%>

    <div class="clear"></div>
    <%-- footer --%>
    <center><div id="footer">
            <a style=" margin-right: 20px; font-family: arial;float: right; color:white"href="adminLogout.jsp">Log Out</a>
        </div></center>
        <%-- footer --%>

</body>
</html>
